home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-08 | 2.1 KB | 95 lines | [TEXT/MPS ] |
- /*
- File: UndoPE.h
-
- Contains: Undo class implementation
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- // -- Compiler/Preprocessor Switches --
-
- #ifndef _COMPILERDEFS_
- #include "CompDefs.h"
- #endif
-
- // -- PanelEditor Includes --
-
- #ifndef _UNDOPE_
- #include "UndoPE.h"
- #endif
-
- #ifndef _SAMPLECOLLECTIONS_
- #include "SampleCollections.h"
- #endif
-
- #ifndef _LISTITEM_
- #include "ListItem.h"
- #endif
-
- #pragma segment PanelEditorUndo
-
- //------------------------------------------------------------------------------
- // Method: Constructor
- //------------------------------------------------------------------------------
-
- CUndo::CUndo()
- {
- fType = kODNULL;
- fSelection = kODNULL;
- }
-
- //------------------------------------------------------------------------------
- // Method: Destructor
- //------------------------------------------------------------------------------
-
- CUndo::~CUndo()
- {
- CListIterator fiter(fSelection);
- for ( CListItem* item = (CListItem*)fiter.First();
- fiter.IsNotComplete();
- item = (CListItem*)fiter.Next() )
- {
- fiter.RemoveCurrent();
- item->Release(somGetGlobalEnvironment());
- }
- }
-
- //------------------------------------------------------------------------------
- // Method: SetType
- //------------------------------------------------------------------------------
-
- void CUndo::SetType(ODUShort type)
- {
- fType = type;
- }
-
- //------------------------------------------------------------------------------
- // Method: GetType
- //------------------------------------------------------------------------------
-
- ODUShort CUndo::GetType()
- {
- return fType;
- }
-
- //------------------------------------------------------------------------------
- // Method: SetSelection
- //------------------------------------------------------------------------------
-
- void CUndo::SetSelection(CList* selection)
- {
- fSelection = selection;
- }
-
- //------------------------------------------------------------------------------
- // Method: GetSelection
- //------------------------------------------------------------------------------
-
- CList* CUndo::GetSelection()
- {
- return fSelection;
- }
-
-